<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/jsp/manage/common/taglibs.jsp" %>
<script type="text/javascript">
    $(function () {

        $.acooly.framework.registerKeydown('manage_ups_from', 'manage_ups_datagrid');
    });
    function gl_a(value,row) {
        if(value){
            return value+" (w)";
        }else {
            return '';
        }
    }

    function ups_sj(value,row) {
        if(value){
            return value+" (分钟)";
        }else {
            return '';
        }
    }
    function ups_t(value,row) {
        if(value){
            return value;
        }else {
            return '';
        }
        if(value=='true'){
            return '<i class="fa fa-check fa-lg fa-fw fa-col" style="color: green"></i>'
        }else{
            return '<i class="fa fa-times fa-lg fa-fw fa-col" style="color: red"></i>'
        }
    }
    function electrictyMeter_t1(value,row) {
        //var type=$("#nyr_ups").val()
       // $.acooly.framework.show('/manage/demo/report/listAll.html?eId=ffffff100000f0f8&createTime='+value+"&type="+type,1400,500);
        var type=$("#manage_ups_from [name='type']").val();
        var str="'ffffff100000f0f8'";
        $.acooly.framework.show('/manage/demo/report/listAll.html?eId=9&eqid='+str+'&createTime='+value+'&type='+type,1300,500);
    }
    function equipentAllZ_d(value,row) {
        return '   <a onclick=" electrictyMeter_t1(\''+row.createTime+'\') " href="#" title="查看"><i class="fa fa-file-o fa-lg fa-fw fa-col"></i></a>';
    }
</script>
<div class="easyui-layout" data-options="fit : true,border : false">
    <!-- 查询条件 -->
    <div data-options="region:'north',border:false" style="padding:5px; overflow: hidden;" align="left">
    <form id="manage_ups_from"  onsubmit="return false">
        <table class="tableForm" width="100%">
            <tr>
                <td align="left">
                    <div>
                        <span>类型：</span>
                        <select name="type" editable="false" style="height:27px;width: 150px" panelHeight="auto" class="easyui-combobox" id="nyr_ups">
                            <option value="1">日报</option>
                            <option value="2">月报</option>
                            <option value="3">年报</option>
                        </select>
                        <span class="div_outter_text">
                            <input  name="begin" type="text" onFocus="WdatePicker({readOnly:false,dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="line-height:28px;
                                   border-radius: 5px; border:1px #95B8E7 solid; width:146px; vertical-align: middle;" placeholder="开始时间" prompt="限办时间(开始)"/>
                        </span>
                        <span class="div_outter_text">
                            <input  name="end" type="text" onFocus="WdatePicker({readOnly:false,dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="line-height: 28px;
                                border-radius: 5px; border:1px #95B8E7 solid; width:146px; vertical-align: middle;" placeholder="结束时间" prompt="限办时间(结束)" />
                        </span>
                        <a href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:false"
                           onclick="$.acooly.framework.search('manage_ups_from','manage_ups_datagrid');">
                            <i class="fa fa-search fa-lg fa-fw fa-col"></i>查询</a>
                        <a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-excel" data-options="plain:false"
                           onclick="$.lora.common.commonExportReport('manage_ups_datagrid','ups')">导出</a>
                    </div>
                </td>
            </tr>
        </table>
    </form>
</div>
<div data-options="region:'center',border:false">
    <table id="manage_ups_datagrid" class="easyui-datagrid" url="/manage/demo/report/upsreport.html" toolbar="#manage_ups_toolbar" fit="true" border="false" fitColumns="false"
           checkOnSelect="true" selectOnCheck="true" singleSelect="true">
        <thead>
        <tr>
            <th colspan="20" align="center" >UPS</th>
        </tr>
        <tr>
            <th field="rowActions" data-options="formatter:function(value, row, index){return equipentAllZ_d(value,row)}">动作</th>
            <th field="createTime" align="center" >日期</th>
            <th field="acVoltagea" align="center"  data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输入电压A</th>
            <th field="acVoltageb" align="center"  data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输入电压B</th>
            <th field="acVoltagec" align="center"  data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输入电压C</th>
            <th field="acCurrenta" align="center"  data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输入电流A</th>
            <th field="acCurrentb" align="center"  data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输入电流B</th>
            <th field="acCurrentc" align="center"  data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输入电流C</th>
            <th field="acOutVoltagea" align="center" data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输出电压A</th>
            <th field="acOutVoltageb" align="center" data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输出电压B</th>
            <th field="acOutVoltagec" align="center" data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输出电压C</th>
            <th field="acOutCurrenta" align="center" data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输出电流A</th>
            <th field="acOutCurrentb" align="center" data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输出电流B</th>
            <th field="acOutCurrentc" align="center" data-options="formatter:function(value, row, index){ return ups_t(value,row) }">交流输出电流C</th>
            <th field="outLookPowera" align="center" data-options="formatter:function(value, row, index){ return gl_a(value,row) }">输出视在功率A</th>
            <th field="outLookPowerb" align="center" data-options="formatter:function(value, row, index){ return gl_a(value,row) }">输出视在功率B</th>
            <th field="outLookPowerc" align="center" data-options="formatter:function(value, row, index){ return gl_a(value,row) }">输出视在功率C</th>
            <th field="positiveBatteryVoltage" align="center" data-options="formatter:function(value, row, index){ return ups_t(value,row) }">正电池组电压</th>
            <th field="batteryTemperature" align="center" data-options="formatter:function(value, row, index){ return ups_t(value,row) }">电池温度</th>
            <th field="batteryRemainCapacity" align="center" data-options="formatter:function(value, row, index){ return ups_sj(value,row) }">电池剩余时间</th>
        </tr>
        </thead>
    </table>
    <div id="manage_ups_toolbar">

    </div>
</div>
</div>